The JS SDK creates a new object per call, so queries are equal when they describe the same collection and constraints.